import request from '@/utils/request'

export function listDoctorSchedule(params) {
  return request({ url: '/system/doctorSchedule/list', method: 'get', params })
}
export function getDoctorScheduleDetail(doctorId, date) {
  return request({ url: `/system/doctorSchedule/${doctorId}/${date}`, method: 'get' })
}
export function setDoctorSchedule(data) {
  return request({ url: '/system/doctorSchedule/set', method: 'post', data })
}
export function closeDoctorSchedule(data) {
  return request({ url: '/system/doctorSchedule/close', method: 'post', data })
}
export function listDoctor(params) {
  return request({
    url: '/system/doctorSchedule/list',
    method: 'get',
    params
  })
}
export function listDepartment(params) {
  return request({ url: '/system/dept/list', method: 'get', params })
}

// 新增排班
export function addDoctorSchedule(data) {
  return request({
    url: '/system/doctorSchedule',
    method: 'post',
    data
  })
}